<?php
/**
 * 配置REST URL 信息
 */
return [

    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'api/v1/default',
        'only' => ['index'],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/user',
        'only' => ['index', 'concern-info', 'options'],
        'extraPatterns' => [
            'GET concern-info' => 'concern-info',
            'OPTIONS concern-info' => 'concern-info'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/concern',
        'only' => ['create', 'options'],
        'extraPatterns' => [
            'POST' => 'create',
            'OPTIONS' => 'options'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/coupon',
        'only' => ['create', 'options'],
        'extraPatterns' => [
            'POST' => 'create',
            'OPTIONS' => 'options'
        ],

    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/sms-code',
        'only' => ['send', 'options'],
        'extraPatterns' => [
            'POST' => 'send',
            'OPTIONS' => 'options'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/user-coupon',
        'only' => ['create', 'options', 'index'],
        'extraPatterns' => [
            'POST' => 'create',
            'OPTIONS' => 'options'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/share-coupon',
        'only' => ['create', 'options', 'index'],
        'extraPatterns' => [
            'POST' => 'create',
            'OPTIONS' => 'options'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/prize',
        'only' => ['create', 'options'],
        'extraPatterns' => [
            'POST' => 'create'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/overt-coupon',
        'only' => ['create', 'options', 'index'],
        'extraPatterns' => [
            'POST' => 'create'
        ],
    ],
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'v1/gift',
        'only' => ['create', 'options', 'index','prize-list'],
        'extraPatterns' => [
            'POST' => 'create',
            'GET prize-list'=>'prize-list',
            'OPTIONS prize-list'=>'prize-list'
        ],
    ]
];
